<?php
include 'settings.inc.php';
$con= mysql_connect($mysql_server,$mysql_user,$mysql_pass) or die(mysql_error());
mysql_select_db($mysql_db,$con) or die(mysql_error());

function funktionen($search){
	$result = "Ergebnisse:<hr>";
	$result .= '<table width="600">';
	$result .= '<tr><td><b>Name</b></td></tr>';
	$sql = "Select * from tasks where trim(title) like '".$search."%' order by title";
	$res = mysql_query($sql) or die("Fehler bei Abfrage");
	while ($row = mysql_fetch_array($res)){
		extract($row);
		if (substr(strtoupper($title),0,strlen($search))== strtoupper($search)){
			$result .= '<tr><td><a href=./show.php?id='.$id.'>'.$title.'</a></td></tr>';
		}
	}
	$result .= '</table>';
	return $result;

}
//SELECT title FROM `tasks` WHERE title like '_IE%' AND title like '%.au3'
?>
